print("循环##################################################start")
# for循环输出集合
names = ['Michael', 'Bob', 'Tracy']
for name in names:
    print(name)
# for循环1-10相加
sum = 0
for x in [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]:
    sum = sum + x
print(sum)
# range()函数，可以生成一个整数序列，再通过list()函数可以转换为list,从0开始
intArray = list(range(10))
print(intArray)
for  x  in range(10):
    print(x)

# while循环
sum = 0
n = 99
while n > 5:
    sum  = sum + n
    n = n - 1
    if n == 80:
        # 通过continue语句，跳过当前的这次循环，直接开始下一次循环
        continue
    if n == 75:
        # break语句可以提前退出循环
        break
    print(sum)
print("end")
print("循环##################################################end\n")
